home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / shsource.zip / SHSOURCE.TXT < prev   
Text File  |  1993-01-01  |  4KB  |  109 lines

  1. Using Word for Windows 2.0 to write source code.
  2.  
  3. Do you write software?
  4. Do you wish your editor had more features?
  5. Tired of text mode, even with all its speed?
  6. Ever wanted to put a chart or spreadsheet into your document?
  7. How about colorizing parts of it.
  8.  
  9. I am a professional programmer, and have converted almost exclusively
  10. to using Microsoft Windows as my development environment.  Within that
  11. environment I use Microsoft Word for Windows 2.0 (Winword). I write 
  12. letters, user manuals, memos, and for the past year I have been writing 
  13. my source code in Winword.  I write assembly and C software for uP's  
  14. like the 6805, 8051, and the 6811.  I also write C code to execute on 
  15. 80x86 uP's.
  16.  
  17. The file shsource.dot is a winword template.  This template is, for the
  18. most part, a collection of macros that intercept various commands like
  19. file save, file open, file exit, and file close.
  20. There are new items on the menus like- 
  21.     Edit Source Code Setup,
  22.     Edit Module Settings,
  23.     Insert Select to bookmark, 
  24.     Insert Function Entry,
  25.     Format Color, 
  26.     Tools Blue Comments, 
  27.     Window Cascade, and 
  28.     Help About Template
  29.  
  30. Under the Help About Template, is a brief description of the other macros
  31. in the collection.
  32.  
  33. **************************************************************************
  34. To Install shsource.dot
  35.  
  36.     simply copy it to the directory where winword.exe is installed.
  37.  
  38. **************************************************************************
  39. To start a new source code document
  40.  
  41.     Start winword, then choose file new,
  42.     Select shsource in the 'use template' list box,
  43.     make sure that you are creating a New Document with the
  44.         radio button on document not template, and
  45.     click OK.
  46.  
  47. **************************************************************************
  48. To attach an existing document
  49.  
  50.     Start winword, and open the existing file
  51.     Choose File Save As... and make the extension .DOC,
  52.     Select Word Document (*.doc) in the 'Save File as Type:" listbox,
  53.     choose OK.
  54.     Select File Template,
  55.     Select shsource in the 'Attach Document To:' list.
  56.     choose OK.
  57.     Select Tools Macro,
  58.     Select AutoExec and choose OK.
  59.  
  60. **************************************************************************
  61. To create a program manager icon for an existing document
  62.  
  63.     Activate program manager
  64.     Choose File New,
  65.     Select the Program Item radio button, and choose OK,
  66.     Type in the description you want to appear under the icon.
  67.     In the command line field, type the following:
  68.         c:\winword\winword.exe c:\projects\widget_1.doc
  69.     In the Working directory, type:
  70.         c:\projects
  71.     Choose OK.
  72.  
  73.     Note that this assumes 3 things:
  74.         1. winword.exe is in the path c:\winword
  75.         2. your source code is in the path c:\projects
  76.         3. your source document is named widget_1
  77.  
  78. **************************************************************************
  79. If your source is spread across several files
  80.     Do the above, except- In the command line field, type the following:
  81.     c:\winword\winword.exe c:\projects\widget_1.doc widget_2 widget_3 /mAutoExec
  82.  
  83.     It will then automatically open the files widget_1.doc, widget_2.doc, widget_3.doc
  84.     all from the same directory c:\projects.
  85.  
  86. The /mAutoExec tells word to automatically run the macro named AutoExec, which is in the
  87. template.  This macro causes the cascade macro to run.
  88.  
  89.  
  90. **************************************************************************
  91. **************************************************************************
  92. **************************************************************************
  93. I use this macro daily, and have been refining it for almost a year.  The number
  94. and frequency of refinements has dropped so low, I thought it was time to share it.
  95.  
  96. If you try it, thank you.  If you grow to use it regularly, I would appreciate a
  97. token of your appreciation, I am asking $20.  This will get you registration information 
  98. so it does not bug you in 30 days, and notification of upgrades.
  99.  
  100. Even if you only try it, or if you use it but don't send in the registration 
  101. fee, I still welcome your suggestions.
  102.  
  103. To register, send your name printed as you wish it registered along with $20.
  104.  
  105. Address correspondence to:
  106.     Dave Smart
  107.     155 Vincent Rd.
  108.     Waterloo, IA 50701-1037
  109.